<html>
<%@ include file="../../common/taglibs.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="format.message.system" /></title>

<script type="text/javascript" >
//游戏管理页面
Ext.namespace('azure', 'azure.common');
azure.common.operationLog = function() {
	var cm_Log;
	var grid_Log, store_Log;
	var mainpanel;
	
	// 創建ColumnModel
	function createCM() {
		
		cm_Log = new Ext.grid.ColumnModel([
		{header : '<fmt:message key="format.Log.operateTime"/>',dataIndex : 'operateTime'},
		{header : '<fmt:message key="format.Log.contents"/>',dataIndex : 'contents'}
		]);


	}

	function createStore() {
		store_Log = new Ext.data.Store({
			id:'LogStore',
			proxy : new Ext.data.HttpProxy({
				url : 'Agent_findOperationLog.action'
			}),
			reader : new Ext.data.JsonReader({
				root : 'pager.data',
				totalProperty : 'pager.totalSize'
			}, [
		{
			name : 'operateTime',
			mapping : 'operateTime'
		}, {
			name : 'contents',
			mapping : 'contents'
		}, {
			name : 'logId',
			mapping : 'logId'
		}])
		});
	}

	function createGrid() {
		createCM();
		createStore();

		grid_Log = new Ext.grid.GridPanel({
			cm : cm_Log,
			store : store_Log,
			height :490,			
			bbar : new Ext.PagingToolbar({
				grid : grid_Log,
				store : store_Log,
				pageSize : 15,
				displayInfo : true,
				displayMsg : '<fmt:message key="format.paging.displayMsg"/>',
				emptyMsg : '<fmt:message key="format.paging.emptyMsg"/>'
			})
		});
		var tempValue = Ext.getCmp('agenListLog').idvalue

		store_Log.load({params:{
			start:0,
			limit:15,
			agentId:tempValue
		}});

	}

	function createUI() {
		createGrid();

		mainpanel = new Ext.Panel({
			frame : false,
			renderTo : 'LogDiv',
			items : [grid_Log]
		});
	}

	//页面初始化
	return {
		init : function() {
			createUI();
		}
	};
}();
Ext.onReady(azure.common.operationLog.init, azure.common.operationLog, true);
</script>
</head>

	<body>
		<div id="LogDiv"></div>
	</body>
</html>
